/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jsysacc.asistencia.model.logic.maestros;

import com.jsysacc.asistencia.model.beans.maestros.Zona;
import com.jsysacc.asistencia.model.dao.design.maestros.IZonaDAO;
import com.jsysacc.asistencia.model.dao.factory.MainDAOFactory;
import java.util.ArrayList;

/**
 *
 * @author Carlos
 */
public class ZonaLogic {

    IZonaDAO zonaDAO = MainDAOFactory.getInstance().getZonaDAO();

    public ZonaLogic() {
    }

    public ArrayList<Zona> getAll() throws Exception {
        return zonaDAO.getAll();
    }

    public ArrayList<Zona> getByCriterio(String criterio, String valor) throws Exception {
        return zonaDAO.getByCriterio(criterio, valor);
    }

    public Zona getByPk(String pk) throws Exception {
        return zonaDAO.getByPk(pk);
    }

    public boolean delete(String pk) throws Exception {
        return zonaDAO.delete(pk);
    }

    public boolean insert(Zona entity) throws Exception {
        return zonaDAO.insert(entity);
    }

    public boolean update(Zona entity) throws Exception {
        return zonaDAO.update(entity);
    }

}
